Mixed code, and method and apparatus for generating the same

ABSTRACT

A mixed code, and a method and apparatus for encoding the same are provided. The mixed code includes a first code image region storing a first code image obtained by encoding first information using color, shading, or a combination thereof, and a second code image region storing a second code image obtained by encoding second information using color, shading, or a combination thereof. The first code image and/or the second code image includes the results of encoding interpretation information, construction information, error control information, and code direction information. The mixed code is made by adjusting the difference in color and brightness between the first and second code images to a predetermined level and combining these images.

CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

This application claims the priorities of Korean Patent Application No.10-2004-0089725, filed on Nov. 5, 2004, and Korean Patent ApplicationNo. 10-2005-0025239, filed on Mar. 26, 2005, in the Korean IntellectualProperty Office, the disclosures of which are incorporated herein intheir entirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a code that is a combination of atleast two code images (hereinafter referred to as a “mixed code”) and amethod and apparatus for generating the same.

2. Description of the Related Art

Recognizable information, such as a character, a number, and a sign, maybe expressed as an image in consideration of the security of theinformation and a space in which the information is to be displayed. Tointerpret such an image (code image) containing information, a decoderis required.

The code image may be a one-dimensional barcode such as a universalproduct code (UPC) and a European Article Number (EAN), and atwo-dimensional code such as a color code, a gray code, a Quick Response(QR) code, a PDF-417 code, and a data matrix. Information may beobtained by recognizing an image and extracting the information from theimage using watermarking designed by MarkAny and a technology ofrecognizing a logo of an image.

Since the image code conceals information and information regarding thecode is not disclosed, a user may have difficulties in using the imagecode. For instance, the user cannot predict whether the image code isavailable to a general mobile terminal or a personal digital assistant(PDA), whether the image is provided from a personal computer (PC), andwhether information is contained in the image code. Also, the amount ofdata that can be expressed using each code is limited. Thus, in general,an image code must be newly produced whenever image data is updated, andit is difficult to include such information indicating whether the datais updated into the image code.

In general, watermarking is used to determine whether a user who desiresto use an image is an authorized user or has a copyright of the image,or to provide network connection services using image information.Therefore, watermarking information is contained in an image not to bedisclosed, and is not related to information regarding the image. Evenif the watermarking information is related to the information regardingthe image, it is impossible to decode the image using the watermarkinginformation. Of course, a watermark can be embedded into a code image,but in this case, the watermark just combined with the original codeimage to make a simple combination thereof.

The color barcode is manufactured by mapping colors to a barcodepattern. Although the number of ways to express information can beincreased through the color barcode, the color barcode is also a simplecombination of the colors and the barcode pattern.

Alternatively, an image can be recognized by a trademark, a logo, or apattern. In detail, an input image is recognized by preparing a databaseof a pattern of a specific image, and comparing the input image with aspecific image from the database to determine the similarity between theimages.

SUMMARY OF THE INVENTION

The present invention provides a mixed code that is a combination offirst and second code images.

The present invention also provides a method and apparatus forgenerating a mixed code by combining first and second code images.

The present invention also provides a computer readable medium storing acomputer program that executes a method of generating a mixed code bycombining first and second code images.

According to an aspect of the present invention, there is provided amixed code obtained by overlapping first information with secondinformation in a region, the first and second information made using atleast one of a character, a number, a sign, and an image, the mixed codecomprising a first code image region storing a first code image obtainedby encoding the first information, the first code image made usingcolors, shading, or a combination thereof; and a second code imageregion storing a second code image obtained by encoding the secondinformation, the second code image made using colors, shading, or acombination thereof, the second code image overlapping with the firstcode image, the colors and shading being distinguished from the colorsand shading used in the first code image, using a predeterminedthreshold.

According to another aspect of the present invention, there is provideda method of generating a mixed code, the method comprising encodingfirst information and second information into a first code image and asecond code image made using colors, shading, shaping, a pattern, or acombination thereof, respectively, each of the first and secondinformation being made using at least one of a character, a number, asign, and an image; and producing a physical or electronic mixed codeimage by setting a difference in color and brightness between the firstand second code images and combining the first and second code imagesaccording to the set difference.

According to yet another aspect of the present invention, there isprovided a method of generating a mixed code, the method comprisingencoding first information made using at least one of a character, anumber, and a sign into a first code image made using colors, shading,shaping, a pattern, or a combination thereof; encoding secondinformation into a second code image made using colors, shading,shaping, a pattern, or a combination thereof, the second informationobtained by performing at least one of adding new information to thefirst information and deleting and changing information in the firstinformation; changing color and brightness of the second code image suchthat a difference in color and brightness between the first and secondcode images corresponds to a predetermined threshold; and mapping thechanged second code image to the first code image.

According to still another aspect of the present invention, there isprovided an apparatus for generating a mixed code, the apparatusincluding a code image generating unit encoding first information andsecond information into a first code image and a second code image whichare using colors, shading, shaping, a pattern, or a combination thereof,the first and second information made using at least one of a character,a number, a sign, and an image; and a code image combining unitproducing a physical or electronic mixed code image by setting adifference in color and brightness between the first and second codeimages and combining the first and second code images based on thedifference in color and brightness.

Accordingly, it is possible to easily make a mixed code that is acombination of the first and second code images.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects and advantages of the present invention willbecome more apparent by describing in detail exemplary embodimentsthereof with reference to the attached drawings in which:

FIG. 1 illustrates a construction of a mixed code according to anembodiment of the present invention;

FIGS. 2, 3A, and 3B illustrate a mixed code according to embodiments ofthe present invention;

FIG. 4 illustrates a process of recognizing construction information ofa mixed code according to an embodiment of the present invention;

FIG. 5 illustrates a process of recognizing construction information ofa mixed code according to another embodiment of the present invention;

FIGS. 6 through 8 illustrate construction information of a mixed codeaccording to embodiments of the present invention;

FIG. 9 is a table illustrating the relationship between basicinformation and additional information according to an embodiment of thepresent invention;

FIG. 10 is a table illustrating regions of a mixed code according to anembodiment of the present invention;

FIG. 11 is a flowchart illustrating a method of generating a mixed codeaccording to an embodiment of the present invention;

FIG. 12 is a table illustrating various relationships between the basicinformation and the additional information according to an embodiment ofthe present invention, represented with signs;

FIG. 13 illustrates examples of a mixed code composed of a color codeimage and a QR code image according to an embodiment of the presentinvention;

FIG. 14 illustrates a process of making a mixed code by combining acolor code image and a QR code image according to an embodiment of thepresent invention;

FIG. 15 is a flowchart illustrating a method of generating a mixed codeaccording to another embodiment of the present invention;

FIG. 16 is a block diagram of an apparatus for generating a mixed codeaccording to an embodiment of the present invention;

FIG. 17 is a detailed flowchart illustrating a method of decoding amixed code according to an embodiment of the present invention;

FIG. 18 illustrates examples of binarization of a mixed code image and alimited rectangular search according to an embodiment of the presentinvention; and

FIG. 19 illustrates a mixed code image with code direction andarrangement information according to embodiments of an embodiment of thepresent invention.

DETAILED DESCRIPTION OF THE INVENTION

Hereinafter, a mixed code, and a method and apparatus for generating themixed code according to exemplary embodiments of the present inventionwill be described in detail with reference to the accompanying drawings.In addition, a method of decoding the mixed code will be described.

FIG. 1 illustrates the construction of a mixed code according to anembodiment of the present invention. Referring to FIG. 1, a codeexpressed with a physical image or an electronic image according to anembodiment of the present invention (hereinafter referred to as a ‘mixedcode’) is composed of a basic code image 100 and an additionalinformation image 150. The additional information image 150 overlapswith the basic code image 100.

The basic code image 100 includes a basic information region 102, acontrol information region 104 (including construction informationregion, a interpretation information region, and a service controlregion), a code direction information region 106, and an error controlinformation region 108 (including an error verification informationregion and an error correction information region).

The additional information image 150 includes an additional informationregion 152, and may further include a control information region, a codedirection information region, and an error control region in anadditional information image region, if necessary.

Information stored in each of the basic information region 102, theadditional information region 152, the control information region 104,the code direction information region 106, and the error correctioninformation region 108, is encoded using colors, shading, a pattern, ora combination thereof. A one-dimensional barcode, such as a universalproduct code (UPC) and an EAN, and a two-dimensional barcode, such as acolor code, a gray code, a QR code, a PDF-417 code, and a data matrix,may be used to encode each region of the basic code image 100 and theadditional information image 150.

FIGS. 2, 3A, and 3B illustrate a mixed code according to embodiments ofthe present invention. Referring to FIG. 2, a mixed code includes abasic code image expressed with a color code and an additionalinformation image expressed with a QR code. The basic code imageincludes a basic information region, a control information region, anerror correction information region, and a code direction detectionregion. The additional information image includes an additionalinformation region, a control information region, an error correctioninformation region, and a code direction information region.

Each region of a mixed code will now be described in greater detail.

1. Basic Information Region

The basic information region is a predetermined part of a basic codeimage constituting the mixed code. This region contains basicinformation that is transformed into a code using colors, shading,figures, a pattern, or a combination thereof. That is, the basicinformation, which can be expressed with characters, numbers, signs,special characters, and images, is transformed into a code representedusing colors, shading, figures, a pattern, or a combination thereofaccording to a predetermined code table, and then stored in the basicinformation region. In general, a code that is easy to recognize, e.g.,a color code, is preferably used as the basic code image.

2. Additional Information Region

The additional information region is a predetermined part of anadditional information image that overlaps with the basic code image inthe mixed code. This region contains additional information that isrepresented with an image obtained using colors, shading, figures, apattern, a mark, a sign, or a combination thereof. That is, theadditional information, which can be expressed with characters, numbers,signs, special characters, images, and a logo, is transformed into acode represented using colors, shading, figures, characters, marks,symbols, or a combination thereof according to a predetermined codetable, and then stored in the additional information region.

If the additional information image is a code, the additionalinformation region is formed as a part of the additional informationimage. When there are a plurality of additional information images, someof sets thereof are used as the additional information region.

The additional information may include only a symbol, a signal, atrademark, and a character. For instance, when the additionalinformation is represented with a symbol, the additional informationimage may further include a region (control information region, etc.)that stores information regarding the type, orientation, and arrangementof the symbol, and the symbol pattern (the similarity between the symbolpattern and another pattern).

3. Control Information Region (Construction Information Region,Interpretation Information Region, and Service Control Region)

3.1 Construction Information Region

The construction information region stores information regarding theconstructions of the basic code image and the additional informationimage, and methods of decoding them. Thus, the method of decoding theadditional image can be easily determined by decoding the constructioninformation region. It is possible to add new construction informationto or cancel the stored construction information from this region, ifrequired.

Basically, the construction information preferably includes informationregarding the types of a code in the additional information image (thecolor code, the QR code, the PDF-417 code, and so on), and the otherinformation may be added to or deleted from the constructioninformation, if required.

The construction information region is included in the controlinformation region(s) of the basic code image and/or the additionalinformation image. However, since a code that is easier to recognize ispreferably constructed as the basic code image, the constitutioninformation region is preferably included in the control informationregion of the basic code image.

Table 1 shows examples of information stored in the constructioninformation region of the mixed code.

TABLE 1 Number of Number of Positions of Types of Encryption Orientationof Additional Sub-basic Additional Additional Method AdditionalInformation Information Information Information Information ElementImages Images Element Images Element Images Element Images

As illustrated in Table 1, the construction information region storesinformation regarding the total number, positions, types, andorientation of additional information element images, the total numberof sub-basic information images, and methods of encrypting them.

(1) Number of additional information element images: A total number ofimages constituting a part of the additional information image thatoverlaps with the basic code image

(2) Number of sub-basic information images: A total number of sub-basicinformation images obtained by dividing the basic code image into equalparts

(3) Positions of additional information element images: The positions ofthe additional information element images can be easily detected byallocating random numbers to the sub-basic information images based onthe total number of the sub-basic information images and designating thenumber of a sub-basic information image in which the center of eachadditional information element image is located.

(4) Types of additional information element images: The type of a codein each additional information element image, the center of which isdesignated in information regarding the positions of the additionalinformation element images in the sub-basic information images.

Table 2 shows information regarding various types of a code in eachadditional information element image on each sub-basic informationimage.

TABLE 2 Image 5x5 Color Type Code QR PDF 417 Character Sign TrademarkPhoto Symbol Information 1 2 3 4 5 6 7 8 Value

Referring to Table 2, different information values are allocated tovarious types of codes of the additional information element images,e.g., a 5×5 color code, the QR code, the PDF417 code, a character, asign, a trademark, a photograph, and a symbol.

(5) Encryption Method: An encryption method used to encrypt eachadditional information element image. Information regarding theencryption method may further specify an error correction level or atechnique available. For instance, the encryption method may be definedas shown in Table 3.

TABLE 3 Value Encryption Method 0 None 1 Watermark 2 Turbo Code 3Encryption Method 3

(6) Orientation of additional information element images: A direction inwhich each additional information element image is arranged in the basiccode image. An additional information element image is read as specifiedin information regarding the orientation thereof.

-   -   0: no inclination    -   1: inclination of 45 degrees    -   2: inclination of 90 degrees    -   3: inclination of 135 degrees    -   4: inclination of 180 degrees    -   5: inclination of 225 degrees    -   6: inclination of 270 degrees    -   7: inclination of 315 degrees

Examples of construction information will now be described in greaterdetail.

(1) When the construction information is indicated with‘441234222200030020’;

TABLE 4 Number of Positions of Types of Orientation of Additional Numberof Additional Additional Additional Information Sub-basic InformationInformation Information Element Information Element Element EncryptionElement Images Images Images Images Method Images 4 4 1 2 3 4 2 2 2 2 00 0 3 0 0 2 0

Referring to Table 4, when the code in the basic code image is a colorcode made using various colors and the construction information regionis recognized from the color code, the basic code image includes fouradditional information images that overlap with one another (see thetotal number of additional information element images), the basicinformation image is divided into four equal parts (see the total numberof sub-basic information images), and the four additional informationimages are added to the centers of the equal four parts, respectively(see the positions of additional information element images). Also, thefour additional information images are QR code images according to thetypes of the additional information element images, and a thirdadditional information element image is rotated by 90 degrees but theother additional information element images are maintained at theiroriginal positions (see the arrangement of the additional informationelement images). Also, the encryption method illustrated in Table 4reveals that three QR codes are not encrypted but a fourth additionalinformation element image is encrypted using “encryption method 3”.

FIG. 4 illustrates a mixed code, and a process of recognizingconstruction information regarding the mixed code shown in Table 4.

(2) When the construction information is represented as ‘111100’ (seeTable 5)

TABLE 5 Number of Number of Positions of Types of Orientation ofAdditional Sub-basic Additional Additional Additional InformationInformation Information Information Encryption Information ElementImages Images Element Images Element Images Method Element Images 1 1 11 0 0

Referring to Table 5, when the code in the basic code image is the QRcode, a total number of additional information images is one, and theadditional information image is a 5×5 color code that is not encryptedand rotated. Also, according to the total number of sub-basicinformation images and the positions of the additional informationelement images, the color code is almost equivalent to the QR code insize and the central point of the color code is identical to that of theQR code. If the color code is 1/9 times smaller than the QR code and thecentral point of the color code is identical to that of the QR code, thenumber of the sub-basic information images is changed to 9 and thepositions of the additional information element images is changed to 5.That is, the color code is located at the center of the QR code that is9 times larger than the color code.

FIG. 5 illustrates a mixed code, and a process of recognizingconstruction information regarding the mixed code shown in Table 5.FIGS. 6 through 8 illustrate other embodiments of constructioninformation regarding a mixed code according to the present invention.

As described above, the construction information region is preferablyincluded in the basic code image so that the entire mixed code image canbe easily decoded.

3.2 Interpretation Information Region (Relationship, Information Format,and Arrangement of Information)

The interpretation information region stores interpretation informationuseful to interpret the mixed code. The interpretation informationspecifies the relationship between the basic information and theadditional information, a manner in which the basic information and theadditional information are combined, and a manner in which the basicinformation and the additional information are decoded. Theinterpretation information region is located in the basic code imageand/or the additional information image. In detail, the interpretationinformation defines the relationship between the basic information andthe additional information, the formats of the basic information and theadditional information, a manner in which the basic information and theadditional information are arranged, and further control of code.

3.2.1 Relationship (see FIG. 9)

FIG. 9 is a table illustrating the relationship between the basicinformation and the additional information. Referring to FIG. 9, therelationship between the basic information and the additionalinformation may be defined as an equal relation, a linking relation, anadditional relation, a subset relation, and an arithmetic relation.

(1) Equal Relation: Basic Information=Additional Information

The basic information may be identical to the additional information. Inthis case, the format of the basic information may not be identical tothat of the additional information. For instance, it is assumed that thecode of the basic code image is a color code and the code of theadditional information image is a QR code. When the result of decodingthe basic information region is “1111”, an additional information regionof a QR code image (additional information image) may also be decoded as“1111”.

(2) Combination: Basic Information+Additional Information

Information regarding the mixed code is made by combining the basicinformation and the additional information.

If the mixed code has information representation of “11112222”, “1111”and “2222” may be encoded as the basic information and the additionalinformation, respectively. It is possible to express various types ofinformation by making a mixed code by adding various types of additionalinformation images to the basic code image.

(3) Subset Relation: Basic Information⊂Additional Information or BasicInformation⊃Additional Information

Information regarding the mixed code may be equivalent to one of thebasic information and the additional information. For instance, when tengoods are put in a box, a mixed code of the box is obtained by encodinginformation represented as 1000 through 1010, and the goods have codeimages corresponding to 1000 through 1010, respectively. Thus, the mixedcode for the box is decoded to obtain information regarding the goods inthe box.

(4) Binary Operation: The interpretation information specifies a binaryoperation to be performed on basic information and additionalinformation regarding the mixed code.

(5) Four Arithmetic Operations: The interpretation specifies fourarithmetic operations to be performed on the basic information and theadditional information of the mixed code.

3.2.2 Information Format

The interpretation information defines the formats of the basicinformation and the additional information. The same code may be decodedin different formats, using characters, numbers, signs, or images. Forinstance, the same code can be decoded into “color”, “636F6C6F72”, i.e.,hexadecimal digits, or “099111108111114”, i.e., binary digits.Accordingly, the mixed code can be decoded variously depending on theformat of the basic information, the additional information or acombination thereof,

3.2.3 Information Arrangement

The positions of pixels of basic information image and the additionalinformation image may be changed, if required. For instance, it ispossible to change an absolute or relative position of each pixel of aQR code disposed on a color code using a predetermined transformationmethod. In this case, arrangement of information defined in theinterpretation information region is decoded and the code of theadditional information image is decoded according to the result ofdecoding.

In general, changing the position of each pixel of an image isapplicable to a service that requires an additional information image tobe encrypted. For instance, it is possible to determine whether aperson's picture is identical to a passport photograph by transformingthe passport photograph into an additional information image, includingthe additional information image into a mixed code, and decoding itusing a region storing information regarding arrangement of information.When using an additional information image that is a code for anauthentication service, for example, the additional information imagecan be protected by changing the positions of pixels thereof. In thiscase, it is preferable that encryption and decryption algorithms areembedded into a program and the additional information image isprocessed after reading the information regarding the arrangement ofinformation from the mixed code. In particular, a degree of encryptingthe additional information image can be increased by further using analgorithm using a key value and a method thereof.

The information regarding the arrangement of information appears to besimilar to the location information and the orientation information ofthe additional information image which are included in the constructioninformation of the mixed code. However, the information regarding thearrangement of information is different from them in that it is obtainedin pixel units or units that are less than the element-image units, notin the unit of the additional information image.

3.2.4 Further Control of Code

An additional information image may later be overlapped with or added tothe basic code image. For instance, when only a color code image hasbeen used, a barcode may be added to overlap with the color code toprovide further, various services. Information regarding the addedimages is stored in the additional information image.

(1) Addition: Additional information is added to information stored in abasic code. For instance, an additional information image is furtherprinted on a document printed with a basic code image for documentmanagement. Also, information regarding the address of a videopresentation file may be added to the original document. In this case, acontrol information region is added to the additional information imagewith an additional information region.

(2) Deletion: An additional information image, e.g., regarding the termof validity of the basic code image, may further be printed on a basiccode image, thereby erasing information linked to the basic code imageor preventing the information from being used.

(3) Modification: The original code information is changed by appointinga portion thereof to be changed when changing of a telephone item of abusiness card, for example.

3.3 Service Control Region

In the service control region, services that additionally use the mixedcode are appointed so as to run an application program according to away in which each service is provided or controlled and to providevarious services using the relationship between the basic informationand the additional information.

For instance, when the basic code image is used to represent theidentification (ID) of a user and the additional information image is aphotograph image of the user, they can be used in various services, suchas a business card information service, a passport authenticatingservice, a simple photo information service, and an individual web siteservice, according to information to be defined in the service controlregion.

The information in the service control region is closely related to theinterpretation information region of the mixed code. However,specifically, the interpretation information concerns an operation to beperformed to constitute and interpret information regarding the mixedcode, whereas the information in the service control region concernsoperating of an application. For instance, the information in theservice control region is used in operating a specific application,designating a user interface, or determining the address of a databaseserver.

4. Error Control Region

The error control region stores information required to determinewhether an error occurs in decoding the mixed code, and correct theerror. The error control region is preferably included in both the basiccode image and the additional information image in order to detect anerror in each image. Such a process is preferably performed on theentire mixed code. However, the inclusion of the error control regioninto the additional information image is optional, particularly, whenthe additional information image is a symbol, a mark, or a photographimage.

Various, general methods such as a parity technique or a check bitoperation may be used to determine whether an error occurs in decodingthe mixed code, and a typical error correction technique such as aReed-Solomon code may be applied to correcting the error.

5. Code Direction Information Region (Direction Detection andArrangement Region)

The code direction information region (direction detection andarrangement region) is included into one of or both the basic code imageand the additional information image. Inclusion of the code directioninformation region is preferable, since it provides a reference pint ofan image and basic information required to determine a sequence in whichthe basic code image or the additional information image is decoded.

The code direction information region is constructed using a generaltechnique using a specific pattern, sign, symbol, or parity operation,so that this region can be easily detected.

For instance, the code direction information region may be constructedusing: starting, ending, and interim descriptors of a barcode or aPDF-417 code; a pattern for detecting the location of a QR code or adata matrix code; a method of determining a sequence in which colorcells are arranged; a method of determining whether a mark/character islocated at its original position (a pattern matching method); or amethod of determining intersecting cells of multiple parity cells (amethod of determining a position at which a particular column intersectswith a particular row, using a parity procedure different from a parityprocedure applied to columns and rows).

In general, the code direction information region is preferably includedin the basic code image so that this region can be easily detected.Inclusion of a code direction information region into the additionalinformation image is optional. However, the inclusion of the codedirection information region enables various uses of the additionalinformation image.

In other words, it is possible to increase the amount of information tobe expressed or diversify the use of the mixed code by arranging thebasic code image and the additional information image in differentdirections. Thus, the mixed code is highly likely to be made by changingthe original direction in which one of the basic code image and theadditional information image is arranged. As noted from the constructioninformation of the mixed code, even when one of the additionalinformation image and the basic code image does not include the codedetection information region, the direction information of one elementimage of the mixed code may be included in the other images of the mixedcode. However, both the basic code image and the additional informationimage preferably include the code direction information region toguarantee image recognition. The above regions of the mixed code arespecified in a table illustrated in FIG. 10.

FIG. 11 is a flowchart illustrating a method of generating a mixed codeaccording to an embodiment of the present invention. Referring to FIG.11, first, information to be expressed using a mixed code is determined(S1100). Next, control information, such as construction information andinterpretation information, of the mixed code is defined (S1105), andbasic information and additional information regarding the mixed codeare determined based on the defined control information (S1110). Next,error correction information that is used to detect and correct anerror, and location information regarding codes of the mixed code aredetermined (S1115).

Next, a basic code image and an additional information image aredetermined based on the determined information (S1120). Then, anoperation is performed on the basic code image and the additionalinformation image to measure the difference in color and brightnesstherebetween, and the difference is compensated for (S1125). Thereafter,the mixed code is made by combining the basic code image and theadditional information image based on the compensated color andbrightness (S1130).

In other words, in the method of FIG. 11, first information and secondinformation, each being made of at least one of a character, a number, asign, and an image, are encoded into a first code image and a secondcode image, which are made using colors, shading, shaping, a pattern, ora combination thereof, respectively (S1100 through S1120).

Next, the difference in color and brightness between the first andsecond code images is set, and a mixed code image, which is a physicalor electronic image, is obtained by combining the first and second codeimages based on the set color and brightness differences (S1125 andS1130).

Each operation of the method of FIG. 11 will now be described in greaterdetail.

1. Determination of the Information Regarding the Mixed Code (S1100)

Information to be expressed using the mixed code is determined. Theinformation may be represented with a character, a number, a sign,and/or an image (pattern, logo, photograph, etc.), or may be content.Also, the information may be transformed into content-relatedinformation through a predetermined method.

2. Determination of the Control Information Regarding the Mixed Code(S1105)

The information to be expressed using the mixed code is divided into thebasic information and the additional information. Thus, the amounts andtypes of the basic information and the additional information may varydepending on the relationship between the basic information and theadditional information. Further, the control information is required tomake the basic information and the additional information such thattheir constructions can be easily recognized.

For instance, the code types of the basic code image and the additionalinformation image, the total number of element images of the additionalinformation image, and arrangement of the additional information imagevary depending on the amounts of the basic information and theadditional information.

The control information of the mixed code is divided into theinterpretation information and the construction information. Theinterpretation information is preferably determined after determinationof the construction information, since the amount and construction ofthe information regarding the mixed code depend on the definition of theinterpretation information. Thus, after determining the controlinformation (interpretation information and construction information),the contents and constructions of the basic information and theadditional information are defined.

In general, when being encoded in the control information region of themixed code, the control information is preferably encoded in apredetermined information format, that is, using a format of numbers andcharacters. In this case, the basic code image and the additionalinformation image can easily be decoded by decoding the controlinformation region of the mixed code prior to interpreting the mixedcode and decoding the basic code image and the additional informationimage based on the result of decoding.

2.1 Determination of Interpretation Information Regarding Mixed Code

In this operation, the interpretation information required to interpretthe mixed code is set. Specifically, the interpretation informationdefines the relationship between the basic information and theadditional information; a combination of the basic information and theadditional information by performing an operation thereon, the formatsof the basic information and the additional information, and arrangementof the basic information or the additional information. Theinterpretation information mixed code is preferably included in thecontrol information region of the mixed code (interpretation informationregion). However, when the interpretation information is included in adecoding program, whether the interpretation information is to beincluded in the mixed code depends on the relationship between the basicinformation and the additional information.

For instance, when a mixed code includes a color code and a 21×21 cellsite QR code that are encoded into the basic code image and theadditional information image, respectively, the interpretationinformation may be determined in a program to specify that the basicinformation is identical to the additional information, that they aremade using numbers and characters, and an encryption method. In thiscase, the control information region (interpretation information region)is not included in the mixed code.

2.1.1 Determination of Relationship

When the information regarding the mixed code is divided into the basicinformation and the additional information, the relationship between thebasic information and the additional information must be set. Forinstance, if the basic information and the additional information areidentical to each other, both of them are encoded using the sameinformation, and if they are combined to form the mixed code, the mixedcode is divided into the basic information and the additionalinformation and they are separately encoded.

When each of the basic information and the additional informationincludes the other, one of them is encoded as the entire informationregarding the mixed code and the other is encoded as a part of theinformation regarding the mixed code. The basic information or theadditional information may be in an arithmetic relation, if required. Inthis case, the information regarding the mixed code can be derived byperforming an operation on one of the basic information and theadditional information using the other information.

One of the basic information and the additional information may be usedas a key value or an index of the other. In this case, when one of thebasic information and the additional information is constructed as afield, data regarding a field corresponding to the other information canbe obtained using a key value of the field. Also, one of the basicinformation and the additional information may be a key value and theother information may specify a Hash function used to calculate aspecific function, particularly, a reverse function. In this case, it ispossible to create new information as the information regarding themixed code by applying the key value to the Hash function. Specifically,the key value is obtained by taking a reverse function of a value of themixed code, and a function and a key value are computed as the basicinformation and the additional information. FIG. 12 is a tableillustrating various relationships between the basic information and theadditional information using signs, according to an embodiment of thepresent invention.

2.2.2 Definition of Information Format

The formats of the basic information and the additional information maybe defined using the relationship between the basic information and theadditional information and the information regarding the mixed code. Theinformation regarding the mixed code may specify whether the format ofeach of the basic information and the additional information is acharacter format, a value format, a sign format, or an image format.

For instance, the same information can be decoded into “color”,“636F6C6F72”, i.e., hexadecimal digits, or “099111108111114”, i.e.,binary digits. Otherwise, the information may be expressed with apredetermined sign, symbol, or pattern construction informationrepresentation of a color paint icon. In particular, an image may berepresented using a series of RGB values.

In most cases, the formats of the basic information and the additionalinformation are different from each other, and thus, both the formats ofthe basic information and the additional information are preferablyspecified.

Table 6 illustrates various formats of information contained in themixed code.

TABLE 6 Decimal English Chinese Korean Japanese Type Number Mode ModeMode Mode Sign RGB Gray Pattern YUV . . . Information 1 2 3 4 5 6 7 8 90 . . . Value

f_(type)(basic information format 1+additional information format 2)=T12

For instance, when the basic information is made of numbers and theadditional information is made of English characters and numbers, theinformation in the mixed code is preferably encoded in a T12 (Type 1 &2) format. The English mode shown in Table 6 supports use of bothEnglish characters and numbers.

2.1.3 Definition of Arrangement of Information

When encoding basic information and the additional information, it ispossible to change a sequence or arrangement in which they are locatedif required. As described above, when it is preferable that codeinformation does not appear directly in an image, e.g., a photographimage, or high-degree encryption of information is required, the orderof the information is changed or the information is encrypted using apredetermined transform technique. In this case, an algorithm by whichthe transformed information is recovered to its original state isrequired. Also, it is effective to set an information value (key value)that indicates a change in the sequence or arrangement of the basicinformation and the additional information.

2.1.4. Definition of Service Information

Information regarding an application to be executed based on the basicinformation or the additional information is preferably set, because themixed code is applicable as information to various types ofapplications. However, when use of the mixed code is obvious or has beenset by programming the information regarding an application may not beset.

2.2 Determination of Construction of Mixed Code

The formats and amounts of the basic information and the additionalinformation are determined the control information regarding the mixedcode. Thus, the types and constructions of the basic code image and theadditional information image that represent the basic information andthe additional information must be determined according to the controlinformation. In this case, the amount of data, the characteristics of amedium onto which the images are to be printed, a recognition method,and a service manner must be considered.

That is, when the mixed code has a large amount of information and isused to express information, the QR code, the PDF417 code, the datamatrix, or an ultra code may be used to represent as a part of an imageconstituting the mixed code. However, when the mixed code is not used toexpress information and digital content is to be imported via a network,a combination of the color code, a cyber code, and a one-dimensional(1D) barcode may be used.

If the mixed code is to be made such that information contained thereincan easily be recognized by a user, an additional information image ofthe mixed code is preferably made of characters, a trademark, a sign, amark, or a pattern.

If the mixed code is to be printed onto a color printing medium, a colorcode or a color image may be used, and if the mixed code is to beprinted onto a black-and-white color printing medium, a gray code or ablack-and-white image may be used.

Different recognition methods must be applied to a high-definitiondisplay apparatus such as a scanner and a low-definition displayapparatus such as a mobile phone camera. When using a mobile phonecamera, the color code, a two-dimensional (2D) code or barcode thatrequires a small number of cells, a simple pattern, or a small amount ofcharacters, numbers, or a trademark image may be used. Use of thehigh-definition display apparatus enables more types of images to beused and a large amount of information to be obtained through a decodingprocess.

It is preferable that a user determines the construction of the mixedcode by selecting desired ones of programmable combinations or pieces ofelement information that are determined in consideration of the amountof data, a recognition method, the characteristics of a medium, and thetype of a service and provided via a user interface. Otherwise, once theuser determines a minimum of characteristics of the mixed code, theconstruction of the mixed code may be automatically set according to aprogram. That is, for instance, when the types of the basic code and theadditional image are determined, the most desirable total number orsizes of cells (or modes) are determined according to the program.

The construction information region of the mixed code stores theconstruction information regarding the basic code. In addition, asdescribed above, the construction information region may further storeinformation regarding a total number, locations, and types, andorientations of additional information element images, a total number ofsub-basic information images, and an encryption method.

In particular, in the encryption method, the additional informationelement images are encrypted, using watermarking or other encodingtechniques, for example. It is effective to set a code, an image ofwhich is easy to detect and decode, as the basic code, and make thecontrol information to decode and make use of the additional informationimage.

3. Determination of Basic Information and Additional Information (S1110)

The formats of the basic information and the additional information, andthe relationship between the basic information and the additionalinformation are set according to the control information. The basicinformation and the additional information, which are encoded to makethe mixed code, are determined according to the formats of the basicinformation and the additional information and the control information.The basic information and the additional information may be made in acharacter format, a number format, a sign format, a symbol format, or apattern format. Each of the basic information and the additionalinformation is transformed into colors, brightness, a shade, a pattern,symbols, characters, signs, or a logo according to a predeterminedtransform table. The results of transforming the basic information andthe additional information are included into a data region of the mixedcode image (the basic information region or the additional informationregion).

4. Determination of Error Correction Region (S1115)

The error correction information regarding the basic information and theadditional information is set. One or at least two of check bits, parityinformation, and error correction information may be used as the errorcorrection information.

It is preferable that the error correction information is obtained byseparately performing an operation on each of the basic information andthe additional information to check an error therein, thereby reducing atime required to perform the operation. However, the error correctioninformation may be obtained by performing the operation on the entiremixed code, if required. In particular, when the information regardingthe mixed code is to include both the error correction information andthe parity information (or the check bits), the parity information ispreferably generated after generation a the error correctioninformation. This is because it is possible to first detect the locationof an error by using a parity operation, and make it possible to use apart of the result of the parity operation in detecting the location andorientation of a code, e.g., the color code.

The check bits are used to detect an error in the barcode, and theparity operation is obvious to those of ordinary skill in the art. TheReed-Solomon code operation is a representative error correctiontechnique. In the case of the QR code and the PDF-417 code, each havinga predetermined error correction region, the predetermined errorcorrection region may be used. If one of two pieces of information isencoded to an image or a logo, inclusion of the error correction regionis optional. In contrast, inclusion of the error correction region intothe basic code is required. Also, information regarding the degree of anerror correction rate may be made in a specific part of the errorcorrection information region or in the order of cells, together withthe error correction region.

5. Determination of Code Direction Information (S1115)

After determining the information regarding the mixed code, the codedirection information region (direction detection and arrangementregion) to be included into the mixed code image must be made. Directiondetection and arrangement information stored in the code directioninformation region may be represented with a specific pattern or afigure, such as the barcode or the QR code, or by using a part of theparity information based on a fact that an operation to be performed ona specific cell is different from that to be performed on the othercells in a color code, for example.

The direction detection and arrangement information may be contained inboth the basic code image and the additional information image, but itmust be contained in the mixed code image.

6. Determination of Basic Code Image and Additional Information Image(S1120)

In operation S1120, the predetermined basic information, additionalinformation, control information, error control information, and codedirection information are divided into the basic code image and theadditional information image so as to virtually set images. Eachinformation is transformed into a color, brightness, a shade, a pattern,a sign, a symbol, a trademark, or a character according to a codetransform table, and is used as a constitutional element of the basiccode image or the additional information image. In operation S1120, thearrangement and sizes of the basic code image and the additionalinformation image may be made based on the construction information ofthe predetermined control information, and the basic code image and theadditional information image may be made based on information regardingencryption method.

7. Computing and Compensating for Difference in Color and BrightnessBetween Basic Code Image and Additional Information Image (S1125)

In operation 1125, to combine the set two images, the difference incolor and brightness between them is determined using a predeterminedalgorithm and apparatus. For instance, the difference in color betweenthem is increased for easy separation of the two images, and thedifference in color and brightness between them is reduced to concealthe additional code image. In operation 1125, based on the predeterminedcontrol information, it is possible to increase or reduce the differencein color and brightness between the images in consideration of the useof a service and the encryption method.

FIG. 13 illustrates embodiments of a mixed code that is a combination ofa color code image and a QR code image according to the presentinvention. The color code image is made using colors and shading, andthe QR code image is a black-and-white image. Thus, the color code andthe QR code may be combined by coloring the QR code based on the colorcode, such that a white part of the QR code is brighter than a blackpart thereof or the black part of the QR code is colored withoutchanging the white part (of course, the opposite is possible).

When using a pattern such as a logo or a trademark, the color andbrightness of the pattern must be determined in consideration of thoseof an image to be used with the pattern. For instance, it is notdesirable that a black pattern overlaps with the QR code, the color andbrightness of which are identical to those of the black pattern or awhite pattern overlaps with the QR code, which leads to damage to theimage.

8. Combination of Basic Code Image and Additional Information Image(S1130)

In operation S1130, the two images, the difference in color andbrightness of which is computed, are combined. In this case, the twoimages are combined to be exactly mapped to each other, based on theconstruction information of the control information. The result ofcombining the two images may be used as a digitalized file, displayed ona display unit, or printed onto a physical medium.

FIG. 14 illustrates a process of generating a mixed code by combining acolor code image and a QR code image according to an embodiment of thepresent invention. Referring to FIG. 14, information regarding the mixedcode is divided into basic information and additional information, andcontrol information required to transform the basic information and theadditional information to a basic code image and an additionalinformation image, respectively, is set. Next, the basic information andthe control information are encoded into colors to obtain the basic codeimage, and the additional information and the control information areencoded into a QR code to obtain the additional information image. Then,the difference in color and brightness between the basic code image andthe additional information image are determined and the basic code imageand the additional information image are combined to make the mixedcode.

FIG. 15 is a flowchart illustrating a method of encoding a mixed codeaccording to another embodiment of the present invention. Referring toFIG. 15, first information comprised of at least one of a character, anumber, a sign, and an image is encoded into a first code image formedusing colors, shading, an image, a pattern, or a combination thereof(S1150).

Next, second information, which is made to add new information to thefirst code image or change or delete information from the first codeimage, is encoded into a second code image made using colors, shading,shaping, a pattern, or a combination thereof (S1155). Specifically,construction information specifying the relationship between the firstand second information and arrangement of information in the second codeimage is made, the second information is encoded in a data region of thesecond code image, and the construction information is encoded in acontrol information region of the second code image.

Next, the difference in color and brightness between the first andsecond code images is set to a predetermined threshold or more, and thecolor and brightness of the second code image are compensated for basedon the set difference (S1160). Next, the second code image is mapped tothe first code image, thereby generating the mixed code (S1165).

FIG. 16 is a block diagram of an apparatus for generating a mixed codeaccording to an embodiment of the present invention. Referring to FIG.16, the apparatus includes a code image generating unit 1600 and a codeimage combining unit 1650. The code image generating 1600 includes aninformation setter 1605, a data region generator 1610, a controlinformation region generator 1615, an error control information regiongenerator 1620, and a code direction information region generator 1625.The code image combining unit 1650 includes an image difference setter1655 and an image mapper 1660.

The code image generating unit 1600 generates a first code image and asecond code image by encoding first information and second informationmade of at least one of a character, a number, a sign, and an image andsecond information to a first code image and a second code image madeusing colors, shading, shaping, a pattern, or a combination thereof,respectively.

The code image combining unit 1650 makes a physical or electronic mixedcode image by setting the difference in color and brightness between thefirst and second code images and combining the first and second codeimages based on the set difference.

Specifically, the information setter 1605 makes interpretationinformation specifying the relationship between the first and secondinformation, and construction information specifying the types of codesencoded in the first and second code images. The information setter 1605makes information regarding the orientation and arrangement in which thefirst and second information are encoded into the first and second codeimages, respectively. Also, the information setter 1605 makes errorcontrol information used to determine whether encoding of the first andsecond information into the first and second code images, respectively,is satisfactory.

The data region generator 1610 encodes the first and second informationin data regions of the first and second code images, respectively, basedon the interpretation information, the construction information, and theinformation regarding the orientation and arrangement.

The control information region generator 1615 encodes the interpretationinformation and the construction information in control informationregions of the first and second code images, respectively.

The error control information region generator 1620 encodes the errorcontrol information in error control information regions of the firstand second code images, respectively.

The code direction information region generator 1625 encodes theinformation regarding the orientation and arrangement in code directioninformation regions of the first and second code images code,respectively.

The image difference setter 1655 determines the colors and brightnessesof the first and second code images so that the difference in color andbrightness between the first and second code images has a predeterminedthreshold or more. The image mapper 1660 changes the colors andbrightnesses of the first and second code images based on the set colorsand brightnesses, and maps the first and second code images to eachother to produce a mixed code.

FIG. 17 is a detailed flowchart illustrating a method of decoding amixed code according to an embodiment of the present invention.Operations of the method illustrated in FIG. 17 will now be described ingreater detail.

1. Input of Image, and Analysis of and Compensation for ColorInformation (S1700 and S1705)

In operations S1700 and S1705, an image with a mixed code is receivedfrom a scanner or a camera or digital data is read out from a computer,the image (or the digital data) is analyzed, and color distortion of theimage (or the digital data) caused by use of an illuminator is removed.Unlike an image produced by a computer, the image input from the scanneror the camera would experience color distortion caused by ambientconditions or the characteristics of a tool used. Color distortionoccurs depending on the degree or color of light emitted from anilluminator (a halogen lamp, a natrium lamp, an incandescent lamp, andso on), the color temperature of an image inputting apparatus, whitebalancing, the resolution of a printing apparatus, and an image modelRGB or YUV.

The characteristics of a physical medium printed with the mixed code aremajor factors that cause color distortion. For instance, colordistortion may be caused due to the color of paper or a medium printedwith the mixed code (e.g., a pink newspaper), the resolution of thepaper or the medium (newspaper: 75 1 pi, and a general type of paper:300 dpi), or the color of or light reflected from the paper or themedium that is coated.

Color distortion sometimes prevents a color from being exactlyrecognized, and as a worst scenario, it causes the color to berecognized as a wrong color. For instance, a halogen lamp, which is ared-based illuminator, places emphasis on a red color value R of the RGBchannels, and thus, green may be recognized as red.

When a reproduced image of the original image appears to have a higheramount of a specific color compared to the distribution of all colors ofthe original image, the colors of the reproduced image are preferablyadjusted by performing an arithmetic operation on RGB values of eachpixel thereof. A gray world assumption (GWA) technique is arepresentative way of adjusting colors of an image. The GWA technique isbased on an assumption that the average of the respective RGB values ofall pixels of an image, which is captured under general ambientconditions, approximate to a predetermined value, i.e., a gray colorvalue. In general, the GWA technique is used to process a large imagethat contains various types of elements, captured under general ambientconditions. However, it is applicable to a code recognition applicationthat uses general colors and brightness, since the mixed code is likelyto be included in an image with general elements and a surplus margin.

In other words, using the GWA technique, the RGB values of each pixel ofthe original image are measured, the average of the RGB values arecomputed, respectively, the similarity among the three mean values iscomputed, and the difference between the value of a specific channel anda predetermined threshold is compensated for.M(i)=M(i)−(E(i)−WE(G)) where i|E(i)>WE(G), iεR, G, B   (1),wherein M(i) denotes an i-channel of whole image; E(i) denotes a meanvalue of i-channel values of a whole image; E(G) denotes the mean valueof brightness values of the whole image, which is computed byM(R)+M(G)+M(B)/3; and W denotes a weight.

In Equation (1), a subtraction operation is used to compensate for acolor value, but various operations such as an addition operation, anexponential operation, and a log operation may be used. In addition, agamut mapping or a correlation method may be used for compensation for acolor value, in particularly, when camera characteristic information isgiven.

2. Binarization (S1710)

In operation S1710, the image input from the scanner or the camera, orthe digital image of the image is transformed to a black-and-whiteimage. In general, a color image is transformed into a black-and-whiteimage using a threshold which is a specific value in the field of imageprocessing, since the amount of computation of a black-and-white imageare less than that of a color image and the black-and-white image can bemore easily processed than the color image. The original image is storedin a separate region.

If necessary, several thresholds to be used when the result oftransformation is not satisfactory are set, thereby improving the resultof transformation. Otherwise, the threshold may be determined bycomputing brightness values of the whole image, computing an averagevalue or a mean value of the brightness values or analyzing a value ofbrightness distortion of image, dividing pixels into groups havingsimilar brightness values, and computing an average of the similarbrightness values of the groups.

Whether the result of transformation is satisfactory is determined insubsequent operations in which a limited rectangle of the mixed code anda code region are derived, respectively, which will later be described.P(x,y)=1, where P(x,y)<T0, Otherwise   (2),wherein P(x,y) denotes the brightness value of pixel coordinates (x,y),and T denotes the threshold.

3. Cancellation of Noise (S1715)

In this operation, noise is canceled from a binarized image. In general,noise is canceled by using length-based filtering, masking, or therelationship between the noise and the edge of an input image and noise.

Noise, which represents unnecessary elements of an image and iscontained in a low-quality binary image in general, is canceled in thisoperation. In the length-based filtering, noise is removed by cancelinga pixel with a specific brightness value by performing an operation onpixels to the left, right, top, and bottom of the pixel when the valueof the pixel is less than a predetermined reference value.

In the masking, noise smaller than a specific size is canceled bymasking each pixel of a block image of a specific size. Canceling noiseby using the property of an edge portion of an input image is based on afact that in general, a code image includes a quite zone (a surplusspace around a code).

In general, a code includes a white surplus space, which separates acode image from background color or the surroundings (characters,colors, or the like), to protect the code image. Therefore, cancellationof noise connected to the edge portion of the input image draws aneffect of removing only the noise from the image, since the edge portionis not associated with the code image.

Noise that is not connected to the edge of the input image arepreferably removed by using size-based filtering or length-basedfiltering. In size-based filtering and length-based filtering, the sizeand length of a pixel are preferably less than those of a minimum unitof element images constituting the mixed code. Otherwise, the mixed codeimage may be damaged.f_(noise)(O_(xy))=0, where Size(O_(xy))<D(white)wherein f_(noise)( ) denotes a noise cancellation function, O_(xy)denotes an object image with coordinates (x,y), Size(O_(xy)) denotes thesize of the object image with coordinates (x,y), and D denotes athreshold size or a threshold length.

4. Derivation of Candidate Region of Code Image (S1720)

Blocking is an operation which is first performed to detect a regionincluding the mixed code from the input image. In blocking, the inputimage is divided into block units, the size of a black image selectedfrom binarized images is computed, and a block with a largest image isdetected based on the size of the black image.

In general, since a relative or absolute minimum size of the code imageto be decoded has been determined, the size of the block is adjusted tothe minimum size, and a total number of black pixels in each block iscomputed to detect a block having a largest number of black pixels. Thecenter of the block having the largest number of black pixels is verylikely to be located inside the code image. Accordingly, it is possibleto easily determine the location of the code image through blocking.

In the case where the total number of black pixels in the blocks arealmost the same, the connection between images included in the blocks isdetected to determine whether they form a whole image. If not, it ishighly probable that the input image includes a plurality of codeimages. In this case, the images in the blocks may be determined as codeimage regions and separately processed. Also, the code image is likelyto be located around the center of the input image. In this case, evenif the code image is small, it can first be processed by applying aweight to a central block if required.i=max(i|sum(P_(i)(x,y))), i=0, 1, . . . , B−1   (4),P_(i)(x,y) denotes a pointing value (0 or 1) of an i^(th) block, and Bdenotes a maximum number of blocks.

5. Derivation of Limited Rectangle (S1725)

The limited rectangle, which is a rectangle enclosing the mixed codeimage, is derived by determining four vertexes of the limited rectangle,using the location of the mixed code that is detected using blocking,and maximum and minimum location values of an image forming the mixedcode. That is, the limited rectangle is derived by setting a point inthe mixed code image, which is detected by blocking, to a central pointand using the maximum and minimum location values of an image thatincludes the point. The mixed code region is derived from the limitedrectangle.

If the inside of the mixed code image is entirely colored, theconnection between the central point and the inside of the mixed codemay be determined to detect the maximum and minimum location values.Alternatively, a virtual rectangle enclosing the mixed code image may bedetected from the outside of the mixed code image to the central pointin upper, lower, left, and right directions.

In the case of the mixed code image that has a pattern shape or an openshape, when the distances between elements of the mixed code image areless than a threshold, the mixed code is considered as being included inone image and the limited rectangle is derived from the mixed codeimage.

FIG. 18 illustrates results of binarizing a mixed code image andsearching for a limited rectangle according to an embodiment of thepresent invention. FIG. 18A illustrates a mixed code image, the insideof which is completely colored, and (b) and FIGS. 18B and 18C illustratemixed code images, the insides of which are incompletely colored. FIGS.18A through 18C are obtained by binarizing the mixed code image based onan assumption that when the distance between elements of the mixed codeis less than a threshold, the elements are connected to each other.

Whether the mixed code image can be detected using the shape of thelimited rectangle in operation S1725 may be determined. When the limitedrectangle distorts extremely, for example, it is a trapezoid, it isdetermined that an error occurs during a binarization process or a noisecancellation process. In this case, a new limited rectangle ispreferably derived again after the threshold is readjusted throughbinarization. Also, when another candidate block is detected duringblocking, a new limited rectangle may be detected using the detectedlimited rectangle.

6. Derivation of Mixed Code Region (S1730)

In operation S1730, the mixed code image is detected from the limitedrectangle. The limited rectangle may include not only the mixed codeimage but also noise enclosing the mixed code image, and thus, the mixedcode must be exactly detected from the limited rectangle. In general,the mixed code image is detected by detecting a borderline determiningthe limits of the mixed code image, or a code sensing pattern.

If the mixed code is clogged, e.g., the color code, it is possible todetect it by extracting characteristic points of an outer portion of themixed code image or the borderline of the mixed code image.

For instance, the vertexes of the mixed code image are detected usingthe limited rectangle and points of images in the limited rectangle,which contact the limited rectangle. Also, the mixed code image can bedetected by determining whether each image is continuous while followingits outer lines from the points to separate the mixed code image fromnoises, and selecting a largest image as the mixed code image from theimages. In general, the outer line of the code image may be detectedusing an edge detecting method using an Laplacian filter or a Sobelfilter or a turtle algorithm.

However, in the case of a 2D code or a barcode that has a pattern shapeand thus is difficult to detect the overall borderline thereof, themixed code image can be derived by detecting a code sensing pattern orstarting and ending patterns, and detecting all code sending patterns.Detecting of the patterns is limited within the limited rectangle, andthus, it is possible to easily detect the mixed code image.

Like the limited rectangle, it is possible to determine whether themixed code image region is appropriately extracted from the limitedrectangle. If the extracted mixed code image distorts extremely,binarization is performed again to reset the threshold and then themixed code image is extracted again. If another candidate block isdetected during blocking, it is possible to detect the limited rectangleagain using the candidate block.

7. Analysis of Image Characteristics (S1735)

When the mixed code image is derived, it is possible to acquireinformation regarding the locations of the characteristic points orstarting and ending regions of the mixed code image, and the borderlineof the mixed code. For instance, when the derived mixed code image is arectangle, information regarding four vertexes thereof is obtained. Ifthe mixed code image is a pattern, information regarding characteristicpoints of each location detecting pattern is obtained. If the mixed codeimage is a circle or an oval, information regarding a region inside theborderline is obtained. Based on the obtained information,characteristics of images in the mixed code image are analyzed.

The characteristics of the images are analyzed mainly by measuring thedistributions of colors and brightness, using information regarding theoriginal color image corresponding to mixed code image, which isobtained through binarization. The image characteristics are analyzed toseparate a basic code image and an additional information image, whichconstitute the mixed code image, from each other, since in general, theyare combined based on the difference in color or brightness betweenthem.

In general, the basic image and the additional image are differentiatedfrom each other by using colors, and by not using colors. When usingcolors, one of the two images is represented based on color information,and the other is represented using different color or shading. When notusing colors, they are differentiated from each other using thebrightness difference between them.

In general, the color information is first analyzed by collectinginformation regarding image pixels in the mixed code image. Whether themixed code image uses the color information is determined according tothe result of analysis, and the distribution of colors is computed usinga RGB channel when it is determined that the mixed code image uses thecolor information.

Whether the mixed code image uses the color information may bedetermined by computing a brightness value of each pixel and comparingthe brightness value with each of the values of RGB channels of thepixel. When the value of a specific channel is less or greater than athreshold, it is determined that the mixed code image uses a colorcorresponding to the specific channel. Otherwise, whether the mixed codeimage uses the color information may be determined by computing therelationship between RGB channels. That is, when the difference amongthe RGB channel values is greater than a threshold or a threshold rate,it is determined that the mixed code image uses the color information.If the basic code image and the additional information image aredifferentiated from each other using only brightness difference, itmeans that they are represented with an achromatic color, and thus, theRGB channel values of each pixel are similar. When it is determined thatthe basic code image and the additional information image use the colorinformation, the color distribution is analyzed to compute the type,distribution region, or characteristics of the color.

When the basic image and the additional image are differentiated fromeach other using brightness difference, it is also possible to computethe type, number, and distribution characteristics of brightnessinformation by computing the brightness distribution of pixels in themixed code image. For instance, when a lot of white pixels aredistributed throughout the mixed code image, the mixed code image isconsidered as having the mixed code, such as a 1D barcode or a 2Dwhite-and-black code, which mainly uses a pattern, a trademark, or alogo. When the mixed code image includes a small number of white pixelsor no white pixels, the mixed code image is considered as having a code,such as a color code or a gray code, which is mainly represented as aregion type (which processes a code region using colors or shading), nota pattern type image. In this case, such image characteristicinformation is obtained to be used as basic information for laterdecoding.

8. Setting of Threshold and Grouping (S1740)

In operation 1740, reference values to be used in separating the basiccode image and the additional information image from the mixed codeimage are determined, using image information regarding the mixed codeimage, which is obtained through analysis of image characteristics.

When colors are used to distinguish the basic code image from theadditional information image, the distribution of colors and therelationship between color channels are measured and the result ofmeasurement is determined as a reference value to be used in determiningcolors. For instance, when one of RGB channel values or a combinationthereof is greater than a threshold, a pixel with the RGB channel valuesis considered as having a predetermined color. Accordingly, absolutevalues, a reference ratio, or a combination of the RGB channels of eachpixel, which can be determined as reference color values, may bedetermined as reference values.

For instance, when a color model is an RGB model, it is possible to seta set of RGB values, which are to be used in determining each color, asreference values. When the color mode is a HSV(HSB) model, it ispossible to set a relative value or an angle value representation ofhue, saturation, and brightness as the reference values. For instance,when using the HSV model, a hue value of a pixel located between 60° and180° is green, that of a pixel located between 180° and 300° is blue,and that of a pixel located at one of the other angles is red. In thiscase, 60°, 180°, and 300° are used as thresholds.

$\begin{matrix}\begin{matrix}{{P(i)} = {{G\mspace{14mu}{where}\mspace{14mu}{Tg}\; 1}<={{HSV}\left( {p(i)} \right)} < {{Tg}\; 2}}} \\{= {{B\mspace{14mu}{where}\mspace{14mu}{Tb}\; 1}<={{HSV}\left( {p(i)} \right)} < {{Tb}\; 2}}} \\{{= {R\mspace{14mu}{where}\mspace{14mu}{otherwise}}},}\end{matrix} & (5)\end{matrix}$wherein Tk denotes a k^(th) color threshold.

For brightness information, thresholds must also be estimated to be usedas reference values in categorizing images mainly into white, black, andgray images. Since gray may be divided into a plurality of levels, aplurality of thresholds corresponding to the plurality of levels may bedetermined.

In general, brightness values of the mixed code image are analyzedthrough a histogram technique, and a threshold is determined by using adense area and a spare area of pixels of a specific brightness value.That is, dense areas of the pixels with the specific brightness valueare categorized into groups, and brightness values used to categorizethe groups are set as thresholds.

The basic code image and the additional information image constitutingthe mixed code image may be distinguished from each other, using acombination of a color and a color, a color and brightness, orbrightness and brightness. When using colors, it is preferable that thecolor of each pixel of the mixed code region is compared with areference color using a color threshold and the colors are divided intoseveral groups according to the connection or the threshold distancebetween the pixels. When the colors are grouped, virtual cells areobtained.

That is, although being different in shading or brightness levels,pixels whose colors are determined to be the same are adjacent to eachother, are considered as belonging to the same group. If a code isobtained by coloring a pattern and thus the distance between pixels islarge, cells are obtained by computing the distance, virtually fillingthe distance with the same color when the distance is less than athreshold, and categorizing the pixels into groups.

Similarly, it is possible to transform the mixed code image into cells,using thresholds for the brightness information. However, in the case ofbrightness information, there are a lot of points to be considered. Oneof the points is that when used together with a color, brightness may berepresented while changing the shade of the color. For instance, when apattern type code such as the QR code is added onto the color code, eachpixel of the QR code may be represented with the color that is equal tothat of a color cell to overlap with the pixel but is darker or lighterthan the color of the color cell.

In this case, all cells of the QR code may do not have the samebrightness value. Accordingly, a threshold must be obtained by computingthe difference in brightness/shade between regions of a cell, which aredivided using a color threshold. Also, the regions of the cell must bedivided into groups according to the brightness and shade of each color,using the threshold. For instance, it is possible to extract darkerportions from each color cell region and pattern the extracted portions.

Of course, a figure, an image, a symbol, or a character can be added toa code image represented using a color or gray, the figure, the image,the symbol, or the character having the same brightness value as thecode image. In this case, it is possible to separate the figure, theimage, the symbol, or the character from the code image only byextracting a threshold for only brightness information.

9. Separation of Basic Code Image and Additional Information Image(S1745)

When the mixed code image is divided into groups using color andbrightness thresholds, image separation is performed based on thegroups, and image grouping is performed according to image elements.When using colors, it is preferable that image separation is performedusing color difference, and then, image separation is performed usingbrightness difference.

When using colors, it is possible to extract cells or patterns that aredetermined to have the same color, using a color threshold, andcategorize the extracted cells or patterns into groups according tocolor. Similarly, when using brightness, it is possible to extractpatterns or cells using an absolute value or a relative difference andcategorize them into groups.

For image grouping, criteria and method therefor are preferablypredetermined in a program. For instance, a mixed code image using colorand brightness information is set to be grouped into images constructedaccording to color information and images constructed according tobrightness information. Then, information regarding colors determined bya color threshold may be collected and grouped to form an image, andinformation regarding relative brightness differences in the resultantcolor cell may be groped to form another image, thereby obtaining amixed code including the color code and the QR code, for example. Thatis, a white region and a black region of a color code including colorcells are mapped to a lighter color and a darker color, respectively.

Alternatively, images with lighter pixels, and images with darker pixelsmay be grouped into two images. A portion that the two images overlapeach other may be separately represented using a different brightnesslevel or a different color. For instance, when the QR code and thebarcode, which are printed with black and white in general, arecombined, they are mapped to different brightness.

Of course, when the QR code and the barcode have different colors, it ispossible to more easily differentiate them from each other. Forinstance, the QR code is mapped to red, the barcode is mapped to blue,and a portion the QR code and the barcode overlaps with each other ismapped to purple. If the mixed code is comprised of such the QR code andthe barcode, it is possible to more easily separate images from themixed code image.

The grouped images are divided into the basic code image and theadditional information image. Determining whether one of the groupedimages is used as the basic code image or the additional informationimage will later be described.

10. Extraction of Code Direction/Arrangement Information, and ImageSource Information (S1750)

First, code direction information must be obtained to extractinformation from the separated two images. The code directioninformation specifies an angle of rotation that is the differencebetween the original angle of the code image and an angle of the codeimage that is rotated. It is impossible to extract code informationaccording to a normal order without the angle of the code image

According to the preset invention, the code information is extractedfrom the two images separated from the mixed code image. A method ofextracting the code information is selected according to imagecharacteristics. For instance, when an image is a code image, apredetermined pattern or location information indicating the directionof the code is included in the image.

FIG. 19 illustrates a mixed code image with code direction andarrangement information according to embodiments of the presentinvention. In the case of a 1 D barcode illustrated in (c) of FIG. 19, aPDF-417 code, or an ultra code, it is possible to obtain code directioninformation by detecting starting and ending patterns. In the case of a2D code, particularly, a QR code illustrated in (b) of FIG. 19, it ispossible to obtain code direction information based on a relativelocation of a detected predetermined location detecting pattern. Whenusing colors, as illustrated in (a) of FIG. 19, code direction andarrangement information may be arranged in a predetermined sequence ofcolors or represented using a combination of parity information as inthe color code or the gray code.

The directions of pixels of a mark, a trademark, a character, or aphotograph can be detected using information regarding theircharacteristic points, line types, and directions. However, since it isdifficult to compute the information before-hand and a large amount ofcomputation is required, it is preferable that a location pattern ofsuch an image is added to or this image is set as an additional imagewhen encoding the image so that direction information can be detectedusing a basic code image.

Arrangement information is information based on which a specificposition in a code image is indicated or decoding is performed. Ingeneral, the barcode or the 2D code includes specific arrangementpatterns as reference patterns to be used in decoding. The specificarrangement patterns may be a center separation pattern of the barcode,or arrangement patterns arranged on and a left outer side of a datamatrix. The color code or the gray code does not require the arrangementpatterns since a related program provides information that they aredivided into a specific number of matrices. However, arrangementinformation is required when cells are divided by a border line or aborder region is provided.

In general, code direction information is related to position detectioninformation. A direction information pattern may be included as a subsetin an arrangement pattern, or the arrangement pattern may be identicalto the direction information pattern. In the case of the color code andthe gray code made in units of regions, not patterns, a directiondetection cell can be detected using parity information regarding eachcell, and arrangement information specifies a borderline between thecells or a predetermined division ratio.

In the case of a region type code, since color information of every cellmust be obtained to detect the direction detection information, sourceinformation values of the code are computed and then the directiondetection region is detected. Thereafter, the source information valuesare rearranged according to the code direction.

The source information is obtained by extracting information from allobtained images in minimum units. The extracted information may betransformed into a number, a character, a sign, a symbol, and/or a colorvalue according to a predetermined transform table.

In the color code, a color value of each cell divided from an image isexpressed with numbers and characters, obtained according to apredetermined transform table. In a black-and-white barcode or the QRcode, black and white patterns are divided into predetermined moduleunits and represented with a series of 0's and 1's. The sizes of suchminimum units may vary according to the arrangement pattern. That is,the size of a minimum unit such as a set of cells or patterns isdetermined by the size and position of the arrangement pattern orpredetermined instructions in a program.

For instance, it is possible to determine a total number of matrix typemodules constituting the QR code by computing the sizes of locationdetection patterns and a ratio of distances between the patterns. In thecase of the color code, cell size is determined using a borderline and acode region is divided into units of cells. When not using theborderline, cell size is determined and a code region is divided inunits of cells, based on that a program instruction that a code that hasa regular tetragon shape is 5×5 and a code that has a right-angledtetragon shape is 8×5. Likewise, a sign, a trademark, a pixel, or animage, information regarding the location of which is difficult to beobtained, may be divided into module units and an operation may beperformed on each module unit.

However, it is not required to derive the source information anddirection and location information from both the two images separated inoperation S1745, since construction information of the image whosesource information and direction and location information are notderived can be obtained using control information which is to beobtained in a subsequent process. Basically, a code image containinglocation and arrangement information may be either a basic code image oran additional information image. If both the basic code image and theadditional information image include the location and arrangementinformation, the types of the basic code image and the additionalinformation image are predetermined in a program, or a code imageincluding control information is detected and one of the separated twoimages is determined as the basic code image using the detected codeimage.

11. Error Control of Derived Code Image (S1755)

In operation S1755, whether each image includes an error is checked andan error, if any, is corrected based on the obtained source information.When the source information is extracted from only one of the two imagesaccording to the direction and arrangement information, this error iscorrected. If the parity operation is used, it is possible to easilydetect an image containing an error using the parity operation. If themixed code does not include information for error correction, thethresholds are reset in operation S1710 or S1740 and error checking andcorrection are performed again. If the mixed code includes errorcorrection information, the error can be corrected using the errorcorrection information.

When the source information is extracted from both the two images, it ispossible to detect and/or correct an error from both the two imagesusing error control information. When one of the two images has anerror, operation 1740 and error checking and correction, i.e., operationS1755, may be performed again on only the image with the error. In thecase of a region type code, since the parity operation is performedthereon before operation S1755, the result of operation is considered.

12. Derivation of Control Information and Image Decoding (S1760)

In operation S1760, the obtained source information is divided intopredetermined units of regions to obtain an information region and acontrol information region. Since the code direction information, thearrangement information region, and the error control region wereobtained in the foregoing operations, the information region and thecontrol information region can be easily obtained. If the sourceinformation is obtained from only one of the two images, the controlinformation is derived to obtain the construction information of theother image and information regarding the relationship between the twoimages. The result of encoding the control information is preferablyincluded in the image region, but when the relationship between thebasic information and the additional information is set via a program,information regarding the relationship is used as the controlinformation as described in 2.1 regarding operation S1100.

(1) Derivation of Construction Information of Mixed Code

The construction of the mixed code is determined to extract the basicinformation and the additional information from the source informationon which error checking and correction is performed based on the errorcontrol information. The construction information regarding each imageis obtained based on the derived control information. If both the twoimages include the control information, it is possible to determine theconstructions of both the two images from the control information.

However, when the control information can be extracted from one of thetwo images, it is possible to determine the construction informationregarding only the other image based on the extracted controlinformation. The construction information may specify the type of thebasic code image, a total number, positions, and types of additionalinformation element images, directions of the additional informationelement images that are arranged, a total number of sub-basicinformation images, and an encryption method used.

(2) Image Decoding Based on Construction Information

Since the construction information specifies the arrangement andpositions of the additional information element images, each additionalinformation element image is divided into predetermined units based onthe construction information and decoded according to the type thereof.For decoding, each additional information element image is adjusted toits original position based on the information regarding the directionsof the additional information element images arranged, and recovered toits original state according to a predetermined algorithm using theinformation regarding the encryption method.

A key value for decoding may be set in the control information ordesignated in a decoding program. Otherwise, when a program requires akey value to determine whether a user is an authorized user, the keyvalue may be given from the user.

Next, decoding is performed on a predetermined region of each additionalinformation element image based on the information regarding the typesand positions of the additional information element images. In detail,decoding is performed by detecting an arrangement pattern, dividing eachadditional information element image into module units, extracting asource code, and extracting error correction information. A process thatis not indicated in the control information may be skipped. The shape ofdata in each information region obtained by decoding may vary dependingon the types of the additional information element images, specified inthe control information region.

For instance, when the additional information element image is a generalcode image, code information values are derived as a character, anumber, a sign, and/or so on. When the additional information elementimage includes a character, a mark, or a trademark, code informationvalues are derived as predetermined values, such as an 8-direction chaincode, a shape number, or a Fourier descriptor, through pattern matching.The 8-direction chain code, the shape number, and the Fourier descriptorare represented with corresponding numbers, characters, signs, symbols,or marks. To obtain such information, pattern information may beobtained by additionally processing each additional information elementimage using a conventional image processing technique, such as thinning,filtering, or planarizing, so that pattern information can be easilyobtained; detecting connection points or characteristic points ofobtained segments; and producing the pattern information based on theresult of detection. Further, a luminosity value or a color value ofeach pixel of a photograph image may be represented using a brightnessvalue or a set of RGB channel values.

13. Derivation of Mixed Code Information Based on InterpretationInformation (S1765)

After deriving the information regions from the two images based on theconstruction information included in the control information, the basicinformation and the additional information are extracted from thederived information regions in operation S1765. Based on the controlinformation set in the code or a program, each information region wasmade by combining the basic information and the additional informationand normalizing the result of combining.

Operation S1765 is performed using the interpretation informationincluded in the control information of the mixed code. First,information that is obtained from each information region and has yet tobe normalized is rearranged in the original state by performing inversetransform, which is one of encoding techniques, thereon based on theinformation regarding manner of information arrangement, stored in thecontrol region. Information regarding the basic information and theadditional information are represented in predetermined informationformats. The information formats may be specified in a predeterminedtransform table in a program. Thus, two pieces of information areobtained.

One of the two pieces of the information is used as the basicinformation and the other is used as the additional information. Asdescribed above, a policy that determines which one of the two pieces ofthe information will be encoded into a basic code image, must be mappedin the control information region or programmatically predetermined. Thepolicy may be specified either in the relationship information of thecontrol information or the construction information.

The two pieces of the information are checked and an operation isperformed thereon, based on the relationship information in the controlinformation, thereby producing the original mixed code information. Themixed code information is obtained as a piece of information, orseparate pieces of information if required.

For instance, when the basic information is identical to the additionalinformation, a code that can be easily or exactly recognized is derivedfrom one of them. This is the same when the basic information and theadditional information are related to each other. However, when each ofthem includes the other, both code information of a base set and codeinformation of a subset must be obtained. When the additionalinformation image is a photograph, it is derived as a visual image, andinformation regarding a basic code used together with this image isseparately provided. As described above, such information is representedusing a character, a number, a sign, a figure, an image, or a trademark.

14. Provision of Service (S1770)

The obtained mixed code information can provide a variety of servicesaccording to the control information or service information set in aprogram. For instance, if the mixed code information specifiesindividual identification and includes photograph information, it can beused to provide a service such as a passport authentication interface ora photo business card interface. Likewise, when the mixed codeinformation includes the basic information and the additionalinformation that are related to each other, it is applicable to physicaldistribution and inventory control.

The present invention can be embodied as a computer readable code in acomputer readable medium. Here, the computer readable medium may be anyrecording apparatus capable of storing data that is read by a computersystem, e.g., a read-only memory (ROM), a random access memory (RAM), acompact disc (CD)-ROM, a magnetic tape, a floppy disk, an optical datastorage device, and so on. Also, the computer readable medium may be acarrier wave that transmits data via the Internet, for example. Thecomputer readable medium can be distributed among computer systems thatare interconnected through a network, and the present invention may bestored and implemented as a computer readable code in the distributedsystem.

The mixed code according to the present invention may include visualinformation indicating the purpose of the mixed code, a field to whichthe mixed code is applicable, and a way of using the same, therebyenabling a user to easily recognize it. For instance, it is possible tomanufacture a cell or a pattern of an image code to include a companyname or a uniform resource locator (URL), using a mixed code that is acombination of an image code and characters. Also, it is possible tomanufacture an image code or each cell of the image code to includeinformation regarding a logo, a symbol or a sign, using a mixed codethat is a combination of an image code. Further, it is possible tomanufacture a complex mixed code that is a combination of an image code,a character, and a logo.

In addition, additional information can be provided by adding anadditional information image to the original image code. That is, it ispossible to increase the amount of data to be contained in the mixedcode by changing or adding additional information to the code.

The mixed code includes information specifying a code region, codedirection, and reference points regarding an additional informationimage, thereby easily searching for the additional information image.That is, when a range of recognition is limited to the code region, itis possible to obtain additional information regarding the shape of thecode region, e.g., the orientation and characteristic points thereof.

An error control information region of the mixed code is used to checkand correct an error in basic code information. The basic code image andthe additional information image are constructed to be decoded using akey value and an encryption method, thereby detecting whether a user isan authorized user who owns a right for a service.

Also, it is possible to make the additional information image be aphotograph image so that it can be used in a security service. Inaddition, the mixed code according to the present invention isapplicable to various fields of services such as inventory control.

While this invention has been particularly shown and described withreference to exemplary embodiments thereof, it will be understood bythose skilled in the art that various changes in form and details may bemade therein without departing from the spirit and scope of theinvention as defined by the appended claims.

What is claimed is:
 1. A computer readable storage medium havingembodied thereon a mixed code a mixed code obtained by overlapping firstinformation with second information in a region, the first and secondinformation made using at least one of a character, a number, a sign,and an image, the mixed code comprising: a first code image regionstoring a first code image obtained by encoding the first informationand construction information regarding a second code image, the firstcode image made using colors, shading, or a combination thereof; and asecond code image region storing the second code image obtained byencoding the second information, the second code image made usingcolors, shading, or a combination thereof, the second code imageoverlapping with the first code image, the colors and shading beingdistinguished from the colors and shading used in the first code image,using a predetermined threshold.
 2. The mixed code of claim 1, whereinin the first code image region, the first code image is obtained byencoding construction information specifying the type of the second codeimage and the first information.
 3. The mixed code of claim 2, whereinthe construction information comprises at least one of: informationregarding a total number of sub-image regions obtained by dividing thefirst code image region into equal parts; information regarding a totalnumber of element images of the second code image; information regardinglocation of the center of each element image in each sub-image region;information regarding the types of codes of the element images;information regarding an encryption method used to encrypt the elementimages; and information regarding a direction in which each of theelement images is arranged.
 4. The mixed code of claim 1, wherein in thefirst code image region, the first code image is obtained by encodinginformation regarding the relationship between the first and secondinformation, together with the first information.
 5. The mixed code ofclaim 1, wherein the first code image region comprises: a basicinformation region storing a code obtained by encoding the firstinformation, the code made using colors, shading, or a combinationthereof; a control information region storing a code obtained byencoding the construction information regarding the second code imageand the information regarding the relationship between the first andsecond information, the code made using colors, shading, or acombination thereof; an error control region storing a code obtained byencoding an error checking code, the code made using colors, shading, ora combination thereof, the error checking code used to detect andcorrect an encoding error in the basic information region; and adirection detection region storing a code obtained by informationregarding a direction in which the first code image is located, the codemade using colors, shading, or a combination thereof.
 6. A method ofgenerating a mixed code, comprising: (a) encoding, using a processor,first information and second information into a first code image and asecond code image made using colors, shading, shaping, a pattern, or acombination thereof, respectively, each of the first and secondinformation being made using at least one of a character, a number, asign, and an image; (b) generating a mixed code image by setting adifference in color and brightness between the first and second codeimages and combining the first and second code images according to theset difference, wherein the first code image includes constructioninformation regarding the second code image; and (c) transforming themixed code image into a physical image or an electronic image, andoutputting the physical image or the electronic image.
 7. The method ofclaim 6, wherein (a) comprises: (a1) setting interpretation informationspecifying the relationship between the first and second information;(a2) setting construction information specifying types of codes in thefirst and second code images; (a3) encoding the first and secondinformation as data regions of the first and second code images,respectively, according to the interpretation information and theconstruction information; and (a4) encoding the interpretationinformation and the construction information as a control informationregion of first code image.
 8. The method of claim 7, wherein theinterpretation information comprises at least one of: informationregarding the relationship between the first and second information;information regarding a format of information in each of the first andsecond code images; information regarding a manner of the information ineach of the first and second code images is arranged; and informationregarding a field of a service to which the mixed code is applied. 9.The method of claim 6, wherein the construction information comprises atleast one of: information regarding a total number of sub-image regionsobtained by dividing the first code image region into equal parts;information regarding a total number of element images of the secondcode image; information regarding location of the center of each elementimage in each sub-image region; information regarding the types of codesof the element images; information regarding an encryption method usedto encrypt the element images; and information regarding a direction inwhich each of the element images is arranged.
 10. The method of claim 6,wherein (a) comprises: (a1) encoding the first and second information asdata regions of the first and second code images, respectively; (a2)setting error control information used to determine whether the encodingof the first and second information as data regions is satisfactory;(a3) encoding the set error control information as error controlinformation regions of the first and second code images, respectively.11. The method of claim 6, wherein (a) comprises: (a1) setting directionand arrangement information regarding a direction and arrangement ofeach of the first and second code images obtained by encoding the firstand second information, respectively; (a2) encoding the first and secondinformation as data regions of the first and second code images,respectively, based on the direction and arrangement information; and(a3) encoding the direction and arrangement information as codedirection information regions of the first and second code images,respectively.
 12. The method of claim 6, wherein (b) comprises: (b1)setting a difference in color and brightness between the first andsecond code images; and (b2) combining the first and second code imagesbased on the difference in color and brightness, such that the secondcode image overlaps with the first code image.
 13. A method ofgenerating a mixed code, comprising: (a) encoding, using a processor,first information and construction information regarding a second codeimage made using at least one of a character, a number, and a sign intoa first code image made using colors, shading, shaping, a pattern, or acombination thereof; (b) encoding second information into a-the secondcode image made using colors, shading, shaping, a pattern, or acombination thereof the second information obtained by performing atleast one of adding new information to the first information anddeleting and changing information in the first information; (c) changingcolor and brightness of the second code image such that a difference incolor and brightness between the first and second code imagescorresponds to a predetermined threshold; (d) generating the mixed codeby mapping the changed second code image to the first code image, and(e) transforming the mixed code into a physical image or an electronicimage, and outputting the physical image or the electronic image. 14.The method of claim 13, wherein (b) comprises: (b1) setting informationregarding the relationship between the first and second information andconstruction information regarding the second code image; and (b2)encoding the second information as a data region of the second codeimage, and the information regarding the relationship and theconstruction information as a control information region of the secondcode image.
 15. An apparatus for generating a mixed code, comprising: acode image generating unit encoding first information and secondinformation into a first code image and a second code image which areusing colors, shading, shaping, a pattern, or a combination thereof, thefirst and second information made using at least one of a character, anumber, a sign, and an image; and a code image combining unit producinga physical or electronic mixed code image by setting a difference incolor and brightness between the first and second code images andcombining the first and second code images based on the set differencein color and brightness; wherein the first code image includesconstruction information regarding the second code image.
 16. Theapparatus of claim 15, wherein the code image generating unit comprises:an information setter setting interpretation information which specifiesthe relationship between the first and second information, andconstruction information which specifies types of codes in the first andsecond code images; a data region generator encoding the first andsecond information as data regions of the first and second code images,respectively, according to the interpretation information and theconstruction information; and a control information region generatorencoding the interpretation information and the construction informationas control information regions of the first and second code Images. 17.The apparatus of claim 15, wherein the code image generating unitcomprises: a data region generator encoding the first and secondinformation as data regions of the first and second code images,respectively; an information seller selling error control informationused to determine whether the encoding of the first and secondinformation as the data regions is satisfactory; and an error controlinformation region generator encoding the set error control informationas error control information regions of the first and second codeimages.
 18. The apparatus of claim 15, wherein the code image generatingunit comprises: an information seller selling direction and arrangementinformation regarding direction and arrangement of the first and secondcode images obtained by encoding the first and second information; adata region generator encoding the first and second information as dataregions of the first and second code images, respectively, based on thedirection and arrangement information; and a code direction informationregion generator encoding the direction and arrangement information ascode direction information regions of the first and second code images.19. The apparatus of claim 15, wherein the code image combining unitcomprises: an image difference seller selling a difference in color andbrightness between the first and second code images to be equal to orgreater than a predetermined threshold; and an image mapper changing thefirst and second code images based on the set difference in color andbrightness and mapping the first code image to the second code image toproduce the mixed code.
 20. A computer readable storage medium havingembodied thereon a computer program for executing the method of claim 6.21. An apparatus for generating a mixed code image, the apparatuscomprising: a controller configured to: generate a first image, whereinthe first image is made by using at least one of color, shading, shapeand pattern, and obtained by encoding content information; generate asecond image, wherein the second image is made by using at least one ofcolor, shading and pattern, and obtained by encoding constructioninformation representing arrangement of the first image; and combine thefirst image and the second image in a region, wherein the at least oneof color, shading, shape and pattern used in the second image isdistinguished from the at least one of color, shading, shape and patternused in the first image based on a predetermined threshold.
 22. Theapparatus of claim 21, wherein the construction information includes atleast one of information regarding a position of the first image andinformation regarding an orientation of the first image.
 23. Theapparatus of claim 21, wherein the first image includes a plurality ofelement images and the construction information regards arrangement ofthe plurality of the element images of the first image.
 24. Theapparatus of claim 23, wherein the construction information includes atleast one of information of the number of the plurality of the elementimages, information regarding a position of the plurality of the elementimages and information regarding an orientation of the plurality of theelement images.
 25. The apparatus of claim 23, wherein the constructioninformation includes information regarding the number of the pluralityof the element images.
 26. The apparatus of claim 21, wherein thecontent information is made using at least one of a character, a number,a sign, an image and a web address.
 27. The apparatus of claim 21,wherein a type of the mixed code includes at least one of a color code,a gray code, a OR code, a 1D or 2D barcode, a ultra code and a PDF-417code.
 28. The apparatus of claim 21, wherein the controller combines thefirst image and the second image by overlapping the first image and thesecond image or mixing the first image and the second image.
 29. Theapparatus of claim 21, wherein the controller determines the at leastone of color, shading, shape and pattern based on the contentinformation.
 30. The apparatus of claim 29, wherein the controllerdetermines the at least one of color, shading, shape and pattern furtherconsidering the construction information.
 31. A method for generating amixed code image, the method comprising: generating a first image,wherein the first image is made by using at least one of color, shading,shape and pattern, and obtained by encoding content information;generating a second image, wherein the second image is made by using atleast one of color, shading and pattern, and obtained by encodingconstruction information representing arrangement of the first image;and combining the first image and the second image in a region, whereinthe at least one of color, shading, shape and pattern used in the secondimage is distinguished from the at least one of color, shading, shapeand pattern used in the first image based on a predetermined threshold.32. The method of claim 31, wherein the construction informationincludes at least one of information regarding a position of the firstimage and information regarding an orientation of the first image. 33.The method of claim 31, wherein the first image includes a plurality ofelement images and the construction information regards arrangement ofthe plurality of the element images of the first image.
 34. The methodof claim 33, wherein the construction information includes at least oneof information of the number of the plurality of the element images,information regarding a position of the plurality of the element imagesand information regarding an orientation of the plurality of the elementimages.
 35. The method of claim 33, wherein the construction informationincludes information regarding the number of the plurality of theelement images.
 36. The method of claim 31, wherein the contentinformation is made using at least one of a character, a number, a sign,an image and a web address.
 37. The method of claim 31, wherein a typeof the mixed code includes at least one of a color code, a gray code, aQR code, a 1D or 2D barcode, a ultra code and a PDF-417 code.
 38. Themethod of claim 31, wherein the combining the first image and the secondimage includes overlapping the first image and the second image ormixing the first image and the second image.
 39. The method of claim 31,wherein the at least one of color, shading, shape and pattern isdetermined by encoding the content information.
 40. The method of claim39, wherein the at least one of color, shading, shape and pattern isdetermined by further considering the construction information.